﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Funcao.aspx.cs" Inherits="RightsRegistrationWeb.Funcao" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Consulta de Funções</title>
    <link rel="Stylesheet" href="CSS/Right.css" />
    <link type="text/css" rel="stylesheet" href="CSS/jquery-dialog.css" />

    <script type="text/javascript" src="JS/jquery-1.5.1.min.js"></script>

    <script type="text/javascript" src="JS/jquery-ui-1.8.13.custom.min.js"></script>

    <script type="text/javascript" src="JS/jquery-blockui.js"></script>

    <script type="text/javascript">
        $(document).ready(function() {
            BlockUI("dvGrdFunction");
            $.blockUI.defaults.css = {};
        });

        function BlockUI(elementID) {
            var prm = Sys.WebForms.PageRequestManager.getInstance();
            prm.add_beginRequest(function() {
                $("#" + elementID).block({ message: '',
                    css: {},
                    overlayCSS: { backgroundColor: '#000000', opacity: 0.4
                    }
                });
            });
            prm.add_endRequest(function() {
                $("#" + elementID).unblock();
            });
        }

        function ReturnFuncao(jsonObject) {
            window.returnValue = $.parseJSON(jsonObject);
            self.close();
        }
        
    </script>

</head>
<body>
    <form id="frmFuncao" runat="server">
    <asp:ScriptManager ID="srcManager" runat="server" />
    <table border="0" cellpadding="4" cellspacing="4" style="width: 100%;">
        <tr>
            <td>
                <fieldset>
                    <table border="0" cellpadding="0" cellspacing="0" style="width: 100%">
                        <tr>
                            <td style="vertical-align: middle; width: 60px;">
                                <asp:Literal ID="ltrPesquisa" runat="server" Text="Pesquisa:" />
                            </td>
                            <td style="width: 260px;">
                                <asp:TextBox runat="server" ID="txtPesquisa" MaxLength="30" Style="width: 90%" />
                            </td>
                            <td style="text-align: right;">
                                <asp:UpdatePanel ID="upnPnlPesquisar" runat="server">
                                    <ContentTemplate>
                                        <asp:Button runat="server" ID="btnPesquisar" Text="Pesquisar" OnClick="btnPesquisar_Click" />&nbsp;
                                    </ContentTemplate>
                                </asp:UpdatePanel>
                            </td>
                        </tr>
                    </table>
                </fieldset>
            </td>
        </tr>
        <tr>
            <td>
                <fieldset>
                    <div id="dvGrdFunction">
                        <asp:UpdatePanel ID="updPnlFunctions" runat="server" UpdateMode="Always">
                            <ContentTemplate>
                                <asp:GridView runat="server" AllowPaging="True" PageSize="10" AllowSorting="True"
                                    CellPadding="2" CellSpacing="1" ForeColor="#333333" Font-Size="X-Small" GridLines="None"
                                    Width="100%" ID="grdFunctions" AutoGenerateColumns="False" OnPageIndexChanging="grdFunctions_PageIndexChanging"
                                    OnRowDataBound="grdFunctions_RowDataBound">
                                    <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                                    <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                                    <PagerStyle BackColor="#5D7B9D" ForeColor="White" HorizontalAlign="Center" Wrap="False" />
                                    <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                                    <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                                    <EditRowStyle BackColor="#999999" />
                                    <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                                    <Columns>
                                        <asp:TemplateField HeaderText="Função" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center">
                                            <ItemTemplate>
                                                <asp:LinkButton runat="server" ID="lnkSigla" href="#" />
                                            </ItemTemplate>
                                            <HeaderStyle HorizontalAlign="Left" />
                                        </asp:TemplateField>
                                        <asp:BoundField HeaderText="Descrição" DataField="Descricao" HeaderStyle-HorizontalAlign="Center">
                                            <HeaderStyle HorizontalAlign="Left" />
                                        </asp:BoundField>
                                    </Columns>
                                </asp:GridView>
                            </ContentTemplate>
                        </asp:UpdatePanel>
                    </div>
                </fieldset>
            </td>
        </tr>
    </table>
    </form>
</body>
</html>
